The most important thing to consider about YUI is it's aim. Many JS
toolkits aim to make a better, faster Web 2.0 website. YUI's focus is
to provide a web GUI framework so that you can create internet
applications much like you can create desktop applications. It is
bigger than other toolkits, but for it's size, you get more (IMHO).
It's plain to see that Yahoo has put the extra effort into figuring out
what works and what doesn't. (See their list of supported browsers
page) YUI provides tons of widgets to work with and the widgets are
more flexible than most that you'll find for other toolkits. The only
more comprehensive toolkit is (I think) ExtJS.
If you're making a website (your target audience are different people
everyday), YUI may not be for you. But if you're making a true
application (your target audience is people who keep coming back), I
think you would be hard-pressed to find a better toolkit.
</voice>
Before becoming a YUI fanboy, I used Mochikit, which is small and fast.
But it's documentation utterly sucks and I was lured by the CSS layouts
and widgets in YUI. If you're curious, http://developer.yahoo.com/yui .
Also, YUI 3 will be out next year. I think it will be a solid contender
on size and development speed to other toolkits such as jQuery and
Scriptaculous.
-tim